import unittest
import os
import HTMLTestRunner_cn
test = unittest.defaultTestLoader.discover(r"C:\Users\ASUS\PycharmProjects\pythonProject\venv\9day")
 # 写出报告模板
report_runner =  HTMLTestRunner_cn.HTMLTestRunner(
    stream=open(file='登录测试.html', mode='wb', ),
    verbosity=3,
    title='登录测试',
    description='登录成功的测试',
    tester='小明'
)
report_runner.run(test)

# import yagmail
#
# yag = yagmail.SMTP(
#     user='2269041896@qq.com',
#     password='生成的授权码 ',
#     host='smtp.qq.com'
#
# )
# yag.send(to='2269041896@qq.com',subject='主题',contents='正文',attachments='度小满测试报告')